﻿using System.Text;

namespace DasherBci
{
    public class CoordinatePairPacket
    {
        private readonly CoordinatePair _coordinatePair;
        
        public CoordinatePairPacket(CoordinatePair coordinatePair)
        {
            _coordinatePair = coordinatePair;
        }

        public string GetPacketString()
        {
            return DasherSettings.XCoordinateLabel + " " + _coordinatePair.X + "\n" +
                   DasherSettings.YCoordinateLabel + " " + _coordinatePair.Y + "\n";
        }

        public byte[] GetBytes()
        {
            return Encoding.ASCII.GetBytes(GetPacketString());
        }
    }
}
